import http from '../util/request.js'
export default {
    getCommentsByPost:(id)=>{
        return http({
            url:'api/comments/post/'+id,
            method:'get'
        })
    },
    addComment:(obj)=>{
        return http({
            url:'api/comments',
            method:'post',
            data:obj,
            headers: {
                'Content-Type': 'application/json'
            }
        })
    }
}